home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / halma-12-c / Halma ƒ / Halma code ƒ / program globals.h < prev   
Encoding:
C/C++ Source or Header  |  1994-07-26  |  2.8 KB  |  119 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        program globals.h
  4.  
  5. Purpose:    This is the header file for all the program-specific
  6.             global variables, #defines, enums, and structs.
  7.  
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12.  
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with this program in a file named "GNU General Public License".
  20. If not, write to the Free Software Foundation, 675 Mass Ave,
  21. Cambridge, MA 02139, USA.
  22.  
  23. \**********************************************************************/
  24.  
  25. #ifndef _PROGRAM_GLOBALS_H_
  26. #define _PROGRAM_GLOBALS_H_
  27.  
  28. #define CREATOR            'Hlma'
  29. #define APPLICATION_NAME "\pHalma"
  30. #define    SAVE_TYPE        'SvGm'
  31. #define    SAVE_VERSION    1
  32.  
  33. enum                    /* window indices in gTheWindowData[] lists */
  34. {
  35.     kAbout=0,            /* about box */
  36.     kAboutMSG,            /* "About MSG" splash screen */
  37.     kHelp,                /* help window */
  38.     kBoardSize,            /* choose board size window */
  39.     kMainWindow            /* main graphics window */
  40. };
  41.  
  42. #define    NUM_WINDOWS        5        /* total number of windows (see above enum) */
  43.  
  44. enum ErrorTypes
  45. {
  46.     allsWell=0,
  47.     
  48.     /* shell errors */
  49.     kNoMemory,
  50.     kNoMemoryAndQuitting,
  51.     kProgramIntegrityNotVerified,
  52.     kProgramIntegritySet,
  53.     kSystemTooOld,
  54.     userCancelErr,
  55.     
  56.     /* deBinHex errors */
  57.     kCantOpenInputFile,
  58.     kCantCreateTempFile,
  59.     kBinHexErr,
  60.     kDiskReadErr,
  61.     kDiskWriteErr,
  62.     kNeedMoreBinHexErr,
  63.  
  64.     /* program-specific errors */
  65.     kCantCreateGame,
  66.     kCantOpenGameToSave,
  67.     kCantWriteGame,
  68.     kCantOpenGameToLoad,
  69.     kCantLoadGame,
  70.     kBadChecksum,
  71.     kSaveVersionNotSupported,
  72.     kJumpOverNonPieceError,
  73.     kNonPieceError,
  74.     kCantGetThereFromHereError,
  75.     kTooManyJumpsError
  76. };
  77.  
  78. enum
  79. {
  80.     sliderID=128,
  81.     pieceColorID=200,
  82.     pieceBWID=201
  83. };
  84.  
  85. enum
  86. {
  87.     kNoPiece=0,
  88.     kPiece,
  89.     kHighlightedPiece
  90. };
  91.  
  92. #define ROW_LEFT    40
  93. #define ROW_TOP        29
  94. #define COL_LEFT    110
  95. #define COL_TOP        29
  96.  
  97. extern    PicHandle        gSliderPict;
  98. extern    CIconHandle        gPieceIconColor;
  99. extern    Handle            gPieceIconBW;
  100.  
  101. extern    short            gNumRows;
  102. extern    short            gNumColumns;
  103. extern    short            Board[9][9];
  104. extern    short            gNumMoves;
  105. extern    short            gNumJumps;
  106. extern    short            gThisStartRow, gThisStartColumn;
  107. extern    short            gStickyButtonRow, gStickyButtonColumn;
  108. extern    Str255            gThisJumpString;
  109. extern    unsigned char    **gTheFullJumpHandle;
  110.  
  111. extern    unsigned char    gSnowSpeed;
  112. extern    unsigned char    gSnowColor;
  113. extern    unsigned char    gSnowMutates;
  114.  
  115. extern    FSSpec            gameFile;
  116. extern    Boolean            deleteTheThing;
  117.  
  118. #endif
  119.